<?php

$pid = pcntl_fork();
if ($pid){
    echo "this is parent process\n";
    sleep(30);
}else if ($pid==0){
    echo "this is child process\n";
}else{
    die("fork failed\n");
}